package com.bw.wxy.widget;

import android.content.Context;
import android.graphics.Color;

import androidx.annotation.Nullable;

import com.yanyusong.y_divideritemdecoration.Y_Divider;
import com.yanyusong.y_divideritemdecoration.Y_DividerBuilder;
import com.yanyusong.y_divideritemdecoration.Y_DividerItemDecoration;

public class VideoPartingLine extends Y_DividerItemDecoration {
    Y_Divider y_divider;

    public VideoPartingLine(Context context){
        super(context);
    }

    @Nullable
    @Override
    public Y_Divider getDivider(int itemPosition) {
        if (itemPosition%2==0){
            y_divider=new Y_DividerBuilder()
                    .setRightSideLine(true,0xfffffff,2,0,0)
            .setBottomSideLine(true, 0xffffffff, 2, 0, 0).create();
        }else {
            y_divider =  new Y_DividerBuilder()
                    .setBottomSideLine(true, 0xffffffff, 2, 0, 0).create();
        }
        return y_divider;
    }
}

